package com.atguigu.spzx.cloud.order.feign;

import com.atguigu.spzx.cloud.order.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * projectName: com.atguigu.spzx.cloud.order.feign
 *
 * @author: 赵伟风
 * description:
 */
//声明调用的服务
@FeignClient(value = "spzx-cloud-user")
public interface UserFeignClient {

    //声明调用的方法 -> 目标的controller一样
    @GetMapping("/api/user/findUserByUserId/{userId}")
    User findUserByUserId(@PathVariable("userId") Long userId);
}
